#include <iostream>

#include <gui/date/calendar.h>
#include <gui/pixmap.h>

#include <QCalendarWidget>
#include <QDateEdit>
#include <QGridLayout>
#include <QPushButton>

#include "calendar.moc"

namespace AccountManagerGui {

//! Constructor
CalendarWidget::CalendarWidget(QWidget* parent) : QDateEdit(QDate::currentDate(),parent)
{
	init();
}

//! Constructor
CalendarWidget::CalendarWidget(const QDate& date, QWidget* parent) : QDateEdit(date,parent)
{
	init();
}

//! Initialize the date editor
void CalendarWidget::init()
{
	setDisplayFormat( "MM/dd/yyyy (ddd)" );
	setCalendarPopup( true );
	calendarWidget()->setFirstDayOfWeek( Qt::Monday );
	calendarWidget()->setGridVisible( true );
}

} // namespace AccountManagerGui
